package com.itheima.demo2_继承的格式;

public class Test {
    public static void main(String[] args) {
        Cat c = new Cat();
        c.name="小花";
        System.out.println(c.name);
        c.eat();
        c.cry();
        c.sleep();
        System.out.println("-----------");
        Dog d = new Dog();
        d.name="旺财";
        System.out.println(d.name);
        d.eat();
        d.cry();
        d.sleep();
    }
}
